home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20021006-20030409 / 000270_fdc@columbia.edu_Sun Feb 9 16:46:00 EST 2003.msg < prev    next >
Text File  |  2020-01-01  |  2KB  |  61 lines

  1. Article: 14064 of comp.protocols.kermit.misc
  2. Path: newsmaster.cc.columbia.edu!news.columbia.edu!news-not-for-mail
  3. From: fdc@columbia.edu (Frank da Cruz)
  4. Newsgroups: comp.protocols.kermit.misc
  5. Subject: Re: input pattern matching blowing my mind...
  6. Date: 9 Feb 2003 16:45:47 -0500
  7. Organization: Columbia University
  8. Lines: 44
  9. Message-ID: <b26i6b$iiv$1@watsol.cc.columbia.edu>
  10. References: <uisvwssje.fsf@att.net> <b213u0$i95$1@watsol.cc.columbia.edu> <u8ywrd5o8.fsf@att.net>
  11. NNTP-Posting-Host: watsol.cc.columbia.edu
  12. X-Trace: newsmaster.cc.columbia.edu 1044827148 2505 128.59.39.139 (9 Feb 2003 21:45:48 GMT)
  13. X-Complaints-To: postmaster@columbia.edu
  14. NNTP-Posting-Date: 9 Feb 2003 21:45:48 GMT
  15. Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:14064
  16.  
  17. In article <u8ywrd5o8.fsf@att.net>,
  18. Thomas A. Horsley <tom.horsley@att.net> wrote:
  19. : >It seems to happen only in \fpattern() arguments, and only when SET INPUT
  20. : >CASE is OFF.
  21. I should have said CASE ON but you figured it out...
  22.  
  23. : Thanks! That works for me, but I have even more confusing results
  24. : now. Here is the script in its current form (which works):
  25. : ...
  26. : If I try to move everything into the while loop:
  27. : output \13
  28. : input 10 {linux> }
  29. : if success {
  30. :    output ssh-add\13
  31. :    while 1 {
  32. :       set input case observe
  33. :       minput 10 {try again: } {linux> } \Fpattern({Enter passphrase for*:?})
  34. :       if failure { break }
  35. :       if = \v(minput) 2 { break }
  36. :       askq /GUI \%p \v(inmatch)
  37. :       output \%p\13
  38. :    }
  39. : }
  40. : connect
  41. : It (once again) never matches the initial prompt. I can't even get
  42. : it to work in this case by leaving off the "E" :-).
  43. :
  44. Whatever the problem is, it's the same one.  As noted on page 458 of Using
  45. C-Kermit, a few commands including SET [ INPUT ] CASE are on the call stack.
  46. The braces around the WHILE statement's command list push a new context
  47. onto the stack.
  48.  
  49. Anyway there's no reason to put the SET INPUT CASE command inside the
  50. WHILE loop since it only needs to be executed once, and the setting is
  51. inherited when you start a new stack level.
  52.  
  53. I still haven't had a chance to look at the source code, but let me just
  54. ask if it makes a difference if you remove the braces from around the
  55. \finput() argument, since they should be superfluous in this case.
  56.  
  57. - Frank
  58.